package com.etc.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.etc.entity.Question;
import com.etc.service.QuestionService;

@RestController
@CrossOrigin(origins = "*")
public class QuestionController {
	
	@Autowired
	private QuestionService questionService;

	@GetMapping(value = "/question")
	public List<Question> getIpInfo() throws Exception {		
		return questionService.getQuestions();
		
	}
	

}
